//
//  TableSizeFitViewCell.m
//  UniverseProject
//
//  Created by king on 2021/6/24.
//  Copyright © 2021 Cloud2209. All rights reserved.
//

#import "TableSizeFitViewCell.h"


@interface TableSizeFitViewCell()



@end


@implementation TableSizeFitViewCell


- (void)initViews{
    
    UIImageView *topBg = [UIImageView new];
    [topBg setImage:LGIMAGE(@"mimamw")];
    topBg.contentMode = UIViewContentModeScaleAspectFit;
    [self.contentView addSubview:topBg];
    self.topBg = topBg;
    
    UILabel *bkLab = [UILabel labelWithTitle:@"" color:LGCOLOR(@"000000") font:LGFONT(15)];
    bkLab.numberOfLines= 0;
    bkLab.textAlignment = 0;
    [self.contentView addSubview:bkLab];
    self.bkLab = bkLab;
    
    
    [self.topBg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(10);
        make.width.mas_equalTo(70);
        make.height.mas_equalTo(70);
        make.left.mas_equalTo(10);
    }];
    
    [self.bkLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(topBg.mas_bottom).offset(0);
        make.bottom.mas_equalTo(self.contentView).offset(0);
        make.left.mas_equalTo(10);
        make.right.mas_equalTo(-10);
    }];
}

- (void)layoutSubviews{
    [super layoutSubviews];
    
//    [self.bkLab sizeToFit];
}


@end
